package com.tjmc.tiomsresource.service.impl;

import com.tjmc.tiomscore.dao.TranPtnHwTpiMapper;
import com.tjmc.tiomscore.model.TranPtnHwTpi;
import com.tjmc.tiomsresource.parser.CMTpiParser;
import com.tjmc.tiomsresource.service.CMTpiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;
import java.util.List;

/**
 * @author Luc
 * @version 1.0
 * @date 2020-05-20 15:41
 */
@Service("cmTpiService")
public class CMTpiServiceImpl extends CMSuperServiceImpl<TranPtnHwTpi> implements CMTpiService {

    @Autowired
    private CMTpiParser cmTpiParser;
    @Autowired
    private TranPtnHwTpiMapper tranPtnHwTpiMapper;

    @Override
    public CMTpiParser getParser() {
        return cmTpiParser;
    }

    @Override
    public TranPtnHwTpiMapper getMapper() {
        return tranPtnHwTpiMapper;
    }

    @Override
    public boolean saveTranPtnHwDataToDB(List<File> xmlFiles) {
        return this.saveTranPtnHwDataToDB(xmlFiles, "TPI");
    }
}
